package com.mjh.zhujianju.service.party;

import com.livew.framework.base.service.BaseService;
import com.livew.framework.exception.XTBusinessException;
import com.livew.framework.page.PagedResult;
import com.mjh.zhujianju.model.party.BuildingExamEO;
import com.mjh.zhujianju.model.party.BuildingExamTopicEO;
import com.mjh.zhujianju.vo.party.BuildingExamResultVO;
import com.mjh.zhujianju.vo.party.BuildingExamTopicVO;
import com.mjh.zhujianju.vo.party.BuildingExamVO;

import java.util.List;
import java.util.Map;

/**
 * 考试科目
 */
public interface BuildingExamService extends BaseService<BuildingExamEO>{

    /**
     * 查询考试列表--wx
     * @return
     */
    List<BuildingExamVO> queryBuildingExamForWXList();

    /**
     * 根据用户id查询用户考试记录
     * @param userId
     * @return
     */
    List<BuildingExamVO> queryBuildingExamByUserIdList(Long userId);

    /**
     * 用户试题提交
     * @param buildingExamVO
     * @return
     */
    Map<String,Object> addExamUser(BuildingExamVO buildingExamVO) throws XTBusinessException;

    PagedResult<BuildingExamVO> findBuildingExamPagination(BuildingExamEO buildingExamEO);

    PagedResult<BuildingExamTopicVO> findBuildingExamTopicPagination(BuildingExamTopicEO buildingExamTopicEO);

    /**
     * 保存
     * @param buildingExamVO
     * @throws XTBusinessException
     */
    Long saveInfo(BuildingExamVO buildingExamVO) throws XTBusinessException;

    /**
     * 保存
     * @param buildingExamTopicVO
     * @throws XTBusinessException
     */
    void saveInfo(BuildingExamTopicVO buildingExamTopicVO) throws XTBusinessException;

    /**
     * 根据id查询考试信息
     * @param id
     * @return
     */
    BuildingExamVO queryBuildingExamInfo(Long id);

    BuildingExamTopicVO queryBuildingExamTopicInfo(Long id);



    void delTopicByPrimaryKey(Long id) throws XTBusinessException;

    BuildingExamVO findBuildingExamInfo(Long id);

    BuildingExamVO findPersonalBuildingExamInfo(Long examId,Long resultId) throws XTBusinessException;

    BuildingExamVO findBuildingExamResultInfo(BuildingExamVO buildingExamVO);

}
